Configure Loopback Exemptions
Loopback exemptions are required where you want to run a Windows Universal Digital Apps Client or Standalone App on the same machine as the App Server to which it needs to connect.
Generally, when developing Digitise apps, we suggest that you install a copy of App Server on your development PC to be used for testing purposes. By default, Windows Universal apps are unable to establish an IP connection to the same machine on which they are running. This means that if you run both a Windows Universal Client or Windows Universal Standalone App and a test App Server on your development machine, by default the two will not be able to talk to each other.
So, if you want to be able to test this way, you will need to configure a loopback exemption for each Windows Universal Client or Windows Universal Standalone App that you want to run on the same PC as your App Server.
There are freely available utilities, such as enableloopbackutility, which allow you to easily set up an exemption. For more information refer to the following web page on the Stack Overflow web site:
http://stackoverflow.com/questions/34589522/cant-see-localhost-from-uwp-app
Alternatively, you can do it manually:
-
Install the Client or Standalone App on the test machine. Install App Server on the same machine, if not already installed.
-
On this PC, run PowerShell as an administrator.
-
Run the command:
Get-AppxPackage <appname>
where <appname> is a search term for either the Client or the Standalone App:
App
Value to use in place of <appname>
Standard Universal Client included within the Product Download
com.ndl.mx.MxUniversalClient
Universal Standalone App
com.ndl.mx.<orgname>.<appname>
where <orgname> is the customer name as entered in the Build System without spaces, and
<appname> is the name of the app as specified in the Build Settings in App Studio, also without spaces.
If you are not sure of the name of your app, you can use the wildcard character, *, e.g. *ndl* would search for all apps with ‘ndl’ in their name. Alternatively, leave this parameter blank to show everything.
The app name doesn’t need to be enclosed in quotation marks.
-
In the details displayed by this command about your Client or Standalone App there will be a field called PackageFamilyName. Copy the name from this field to the clipboard by selecting the name and then typing Ctrl+C.
-
Run the command:
checknetisolation loopbackexempt –a –n=“<packagefamilyname>”
where <packagefamilyname> is the name you copied in the previous step – paste in using Ctrl+V.
-
This adds an exception to your local computer that will allow you to use a loopback address (e.g. “localhost”) as a server in your Universal Client or Standalone App for testing purposes.